import {
	getRequest,
	postRequest,
	putRequest,
	postParamsRequest
} from './http'//引入同级目录下的http.js


//------ 获取验证码 --------
export const PHONE_SEND_CODE = data => postRequest('/action/apiv2/phone_send_code', data);
//------ 验证手机号 --------
export const PHONE_VALIDATE = data => postRequest('/action/apiv2/phone_validate', data);
//------ 注册 --------
export const REGISTER = data => postRequest('/action/apiv2/account_register', data);
//------ 登录 --------
export const LOGIN = data => postRequest('/action/apiv2/account_login', data);
//------ 重置密码 --------
export const RESET_PASSWORD = data => postRequest('/action/apiv2/account_password_forgot', data);

//------ 个人信息 ------
// export const USER = data => postRequest('/action/openapi/user', data); //当前用户登录账户信息
// export const USER_INFORMATION = data => postRequest('/action/openapi/user_information', data); //用户详情
// export const MY_INFORMATION = data => postRequest('/action/openapi/my_information', data); //个人主页详情
// export const PORTRAIT_UPDATE = data => postRequest('/action/openapi/portrait_update', data); //头像更新
// export const FRIENDS_LIST = data => postRequest('/action/openapi/friends_list', data); //获取好友列表
// export const ACTIVE_LIST = data => postRequest('/action/openapi/active_list', data); //动态列表
// export const UPDATE_USER_RELATION = data => postRequest('/action/openapi/update_user_relation', data); //更新好友关系（加关注、取消关注）

// export const USER_PORTRAIT_RADAR_MAP = data => postRequest('/radar/getUserPortraitRadarMap', data); //技能雷达


export const USER_INFO = data => getRequest('/action/apiv2/user_info', data); //用户详情
export const BLACKLIST = data => getRequest('/action/apiv2/user_blacklist', data); //黑名单
export const USER_MESSAGE_MENTIONS = data => postRequest('/action/apiv2/user_msg_mentions', data); //我的消息-@我
export const USER_MESSAGE_COMMENTS = data => postRequest('/action/apiv2/user_msg_comments', data); //我的消息-评论
export const USER_MESSAGE_LETTERS = data => postRequest('/action/apiv2/user_msg_letters', data); //我的私信
export const BLACK_REVERSE = data => postRequest('/action/apiv2/black_reverse', data); //加入/移出黑名单
export const USER_MEDAL = data => postRequest('/action/apiv2/user_medal', data); //勋章
export const READ_RECORD = data => postRequest('/action/apiv2/user_read_list', data); //阅读记录
export const FANS_LIST = data => getRequest('/action/apiv2/user_fans', data); //获取粉丝列表
export const FOLLOWS_LIST = data => getRequest('/action/apiv2/user_follows', data); //获取关注列表
export const USER_RELATION_REVERSE = data => postRequest('/action/apiv2/user_relation_reverse', data); //关注、取消关注
export const QUESTION_LIST = data => postRequest('/action/apiv2/question', data); //问答列表
export const EVENT_LIST = data => postRequest('/action/apiv2/event_list', data); //活动列表
export const ACTIVITY_LIST = data => postRequest('/action/apiv2/user_activity', data); //讨论列表
export const USER_TAGS = data => postRequest('/action/apiv2/user_tags', data); //标签列表
export const UPDATE_TAG_RELATION = data => postRequest('/action/apiv2/put_tags', data); //关注、删除标签
export const SEARCH_TAG_BY_NAME = data => postRequest('/action/apiv2/search_tags_by_name', data); //搜索标签


export const DETAIL = data => postRequest('/action/apiv2/detail', data); //获取详情
export const PROJECT_COMMENT_LIST = data => postRequest('/action/apiv2/project_comment_list', data); //软件评论列表
export const PROJECT_COMMENT_PUSH = data => postRequest('/action/apiv2/project_comment_push', data); //软件评论

export const SBU_LIST = data => postRequest('/action/apiv2/sub_list', data); //综合-资讯、推荐、问答、博客
export const COMMENT_PUSH = data => postRequest('/action/apiv2/comment_push', data); //评论

//------ 新闻 ------
// export const NEWS_LIST = data => postRequest('/action/openapi/news_list', data); //获取新闻列表
// export const NEWS_DETAIL = data => postRequest('/action/openapi/news_detail', data); //获取新闻详情

//------ 帖子 ------
// export const POST_LIST = data => postRequest('/action/openapi/post_list', data); //获取讨论区的帖子列表(对应android的 问答 分享 综合 职业 站务)
// export const POST_PUB = data => postRequest('/action/openapi/post_pub', data); //发布帖子
// export const POST_DETAIL = data => postRequest('/action/openapi/post_detail', data); //获取帖子详情

//------ 动弹 ------
export const TWEET_DETAIL = data => postRequest('/action/apiv2/tweet', data); //获取动弹详情
export const TWEET_PUB = data => postRequest('/action/apiv2/tweet', data); //发布动弹
export const TWEET_DELETE = data => postRequest('/action/apiv2/tweet_delete', data); //删除动弹
export const TWEET_LIST = data => getRequest('/action/apiv2/tweets', data); //获取动弹列表 （最新动弹列表 我的动弹）
export const TWEET_LIKE_LIST = data => postRequest('/action/apiv2/tweet_likes', data); //动弹点赞列表
export const TWEET_LIKE_REVERSE = data => postRequest('/action/apiv2/tweet_like_reverse', data); //动弹点赞
export const TWEET_COMMENT = data => postRequest('/action/apiv2/tweet_comment', data); //动弹点赞
export const TWEET_COMMENT_LIST = data => postRequest('/action/apiv2/tweet_comments', data); //动弹评论列表
export const TOPIC_TWEET_LIST = data => postRequest('/action/apiv2/topic_tweets', data); //话题动弹列表
export const TOPIC_DETAIL = data => postRequest('/action/apiv2/topic_detail', data); //话题
export const TOPIC_RECOMMEND = data => postRequest('/action/apiv2/topic_recommend', data); //话题列表


//------ 博客 ------
// export const BLOG_LIST = data => postRequest('/action/openapi/blog_list', data); //获取博客列表
// export const BLOG_PUB = data => postRequest('/action/openapi/blog_pub', data); //发布博客
// export const BLOG_RECOMMEND_LIST = data => postRequest('/action/openapi/blog_recommend_list', data); //获取博客推荐列表
// export const BLOG_DETAIL = data => postRequest('/action/openapi/blog_detail', data); //博客详情
// export const BLOG_CATALOG_LIST = data => postRequest('/action/openapi/blog_catalog_list', data); //获取博客分类列表
// export const USER_BLOG_LIST = data => postRequest('/action/openapi/user_blog_list', data); //获取用户博客列表

export const USER_BLOG = data => postRequest('/action/apiv2/blog', data); //获取用户博客列表

//------ 评论 ------
// export const BLOG_COMMENT_LIST = data => postRequest('/action/openapi/blog_comment_list', data); //获取博客评论列表
// export const BLOG_COMMENT_PUB = data => postRequest('/action/openapi/blog_comment_pub', data); //发布博客评论
// export const BLOG_COMMENT_REPLY = data => postRequest('/action/openapi/blog_comment_reply', data); //回复博客评论
// export const USER_BLOG_DELETE = data => postRequest('/action/openapi/user_blog_delete', data); //删除用户博客
export const COMMENT_LIST = data => postRequest('/action/apiv2/comment_list', data); //获取评论列表
// export const COMMENT_PUB = data => postRequest('/action/openapi/comment_pub', data); //发表评论
// export const COMMENT_REPLY = data => postRequest('/action/openapi/comment_reply', data); //回复评论
// export const COMMENT_DELETE = data => postRequest('/action/openapi/comment_delete', data); //删除评论

//------ 收藏 ------
// export const FAVORITE_LIST = data => postRequest('/action/openapi/favorite_list', data); //获取收藏列表
// export const FAVORITE_ADD = data => postRequest('/action/openapi/favorite_add', data); //添加收藏
// export const FAVORITE_REMOVE = data => postRequest('/action/openapi/favorite_remove', data); //取消收藏

export const FAVORITE_LIST_V2 = data => postRequest('/action/apiv2/favorites', data); //获取收藏列表
export const FAVORITE_REVERSE = data => postRequest('/action/apiv2/favorite_reverse', data); //收藏、取消收藏

//------ 软件 ------
// export const PROJECT_DETAIL = data => postRequest('/action/openapi/project_detail', data); //获取软件详情
// export const PROJECT_CATALOG_LIST = data => postRequest('/action/openapi/project_catalog_list', data); //获取软件分类列表(只有2级)
// export const PROJECT_LIST = data => postRequest('/action/openapi/project_list', data); //软件分类下的的软件列表
// export const PROJECT_TAG_LIST = data => postRequest('/action/openapi/project_tag_list', data); //Tag下的软件列表
//https://h5.oschina.net
export const PROJECT_BANNER = data => postRequest('/apiv3/projectBanner', data);//软件 banner
export const PROJECT_RECOMMEND = data => postRequest('/apiv3/projectRecommend', data);//软件 推荐列表
export const PROJECT_HOT_CN = data => postRequest('/apiv3/hotCNProjects', data);//软件 热门国产
export const PROJECT_LATEST = data => postRequest('/apiv3/latestProjects', data);//软件 最新
export const PROJECT_OPEN_SOURCE_COMPANIES = data => postRequest('/apiv3/openSourceCompanies', data);//软件 开源公司
export const PROJECT_COMPANY_PROJECT_LIST = data => postRequest('/apiv3/companyProjectList', data);//软件 公司软件

//------ 私信 ------
// export const MESSAGE_LIST = data => postRequest('/action/openapi/message_list', data); //获取私信列表
// export const MESSAGE_DELETE = data => postRequest('/action/openapi/message_delete', data); //删除私信

//------ 搜索 ------
export const SEARCH_ARTICLE = data => postRequest('/action/apiv2/search_articles', data); //获取搜索列表
export const SEARCH = data => postRequest('/action/apiv2/search', data); //搜索

//------ 首页-推荐 ------
export const GET_ARTICLES = data => postRequest('/action/apiv2/get_articles', data); //推荐列表

//------ 通知 ------
// export const USER_NOTICE = data => postRequest('/action/openapi/user_notice', data); //获取用户通知
// export const CLEAR_NOTICE = data => postRequest('/action/openapi/clear_notice', data); //清除用户通知

//------ banner ------
export const BANNER = data => postRequest('/action/apiv2/banner', data); //博客、资讯


//------ 发现 ------
export const FIND = data => postRequest('/apiv3/find', data); //发现